<link rel="stylesheet" type="text/css" href="/bootstrap/css/DT_bootstrap.css"></link>
<script type="text/javascript" charset="utf-8" language="javascript" src="/js/dataTable/DT_bootstrap.js"></script>

<script type="text/javascript" charset="utf-8">
			/* Table initialisation */
			$(document).ready(function() {
				$('.dataTable').dataTable( {
					"sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
					"sPaginationType": "bootstrap",
					"oLanguage": {
						"sLengthMenu": "_MENU_ records per page"
					}
				} );4
			} );
		</script>
<script type="text/javascript">
    function mostrarRequisitos()
    {  requisitos=window.open("/requisitos/requisitos.html", "Requisitos", 'width=863,height=736,scrollbars=yes');
       requisitos=testwindow.moveTo(10, 50);
    }
</script>
            
<div class="row"  style="margin-left: 10px">
    <div class="span12">
        <h2>Seleccione Especialidad</h2>
        
                <br>
                <table cellpadding="0" cellspacing="0" border="1" class="table table-striped table-bordered dataTable">    
                    <thead>
                        <tr>
                            <td>Especialidades</td>
                            <td>Medicos</td>
                            <td>Seleccionar</td>
                        </tr>
                    </thead>    
                    <tbody>
                        <?php include_once("Clases/Especialidad.php");?>
                        <?php if(count($this->especialidades)): ?>
                            <?php foreach($this->especialidades as $e):?>
                                <?php if($e->getNombre()!=""):?>
                                    <tr class="gradeA">
                                        <td style="vertical-align: middle;" ><p class="span4"><?php echo $e->getNombre()?></p> </td>
                                        <td style="vertical-align: middle; " ><?php foreach($e->getMedicos() as $medico){
                                            ?><p class="span4" style="vertical-align: bottom"><?php echo $medico?><br></p>  
                                        <?php }?> 
                                        </td>
                                        <td style="vertical-align: middle;text-align: center" ><a class="span4"><button onclick="window.location.href='/consulta/elejirespecialidad/idEsp/<?php echo $e->getId()?>/Esp/<?php echo $e->getNombre()?>'">Seleccionar</button></a></td>
                                    </tr>
                                <?php endif;?>
                            <?php endforeach;?>
                        <?php else: ?>
                        <tr>
                            <td>No hay registros</td>
                        </tr>
                        <?php endif;?>
                    </tbody>
            </table>
            </div>
            
    </div>
